package org.kl.bf.entity.basic;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.kl.bf.entity.AuditableEntity;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

@Entity
@Table(name = "basic_attachment_master")
public class AttachmentMaster extends AuditableEntity {
	private static final long serialVersionUID = 1L;
	private String projectNo;//项目编号
	private String levelType1;//一级文档类型
	private String levelType2;//二级文档类型
	private String businessCode;//业务单据编号
	private List<Attachment> attachmentList;//附件列表
	
	@OneToMany(mappedBy="attachmentMasterId")
	@JsonInclude(Include.NON_NULL)
	public List<Attachment> getAttachmentList() {
		return attachmentList;
	}
	
	@OneToMany(mappedBy="attachmentMasterId",cascade=CascadeType.PERSIST)
	public void setAttachmentList(List<Attachment> attachmentList) {
		this.attachmentList = attachmentList;
	}
	
	public String getProjectNo() {
		return projectNo;
	}
	public void setProjectNo(String projectNo) {
		this.projectNo = projectNo;
	}
	public String getLevelType1() {
		return levelType1;
	}
	public void setLevelType1(String levelType1) {
		this.levelType1 = levelType1;
	}
	public String getLevelType2() {
		return levelType2;
	}
	public void setLevelType2(String levelType2) {
		this.levelType2 = levelType2;
	}
	public String getBusinessCode() {
		return businessCode;
	}
	public void setBusinessCode(String businessCode) {
		this.businessCode = businessCode;
	}
	
	
}